<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersLeaderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users_leader', function (Blueprint $table) {
            $table->increments('id');
            $table->string('leader')->default('0')->comment('等级');
            $table->string('leader_name')->default('0')->comment('等级名称');
            $table->decimal('amount',16,4)->default('0')->comment('个人产品数量3000$');
            $table->string('team')->default('0')->comment('团队3组IB 不重叠 每组至少5万$');
            $table->tinyInteger('push_tjr')->default('0')->comment('个人直接推荐人 3 人');
            $table->decimal('team_amount',16,4)->default('0')->comment('团队部业绩 10000$');
            $table->tinyInteger('number')->default('0')->comment('交易手数4$/手');
            $table->decimal('abonus',16,4)->default('0')->comment('分红比例');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users_leader');
    }
}
